package com.hoppinzq.service.http;

import com.hoppinzq.service.http.annotation.*;

/**
 * @author:ZhangQi
 * 一个例子
 */
public interface ExampleApi {

    @HttpHeaders({
        @HttpHeader(key = "x-zhang0",value = "qi0"),
        @HttpHeader(key = "x-zhang1",value = "qi1"),
        @HttpHeader(key = "x-zhang2",value = "qi2")
    })
    @HttpHeader(key = "x-zhang",value = "getToken")
    @HttpApi(url = "http://127.0.0.1:8801/service/hoppinzq?method=getGatewayMapping&params={}")
    @ResponseBody
    String getData();

    @ZQGatewayMethod("getGatewayMapping")
    @HttpApi(url = "http://127.0.0.1:8801/service/hoppinzq")
    String getData1(@ZQGatewayParam String param);

    @HttpHeader(key = "x-encode",value = "true")
    @HttpApi(url = "http://127.0.0.1:8801/service/hoppinzq?method=${param1}&params=${param2}&token=${param3}")
    String getData2(String param1,String param2,String param3,@HttpHeader(key = "token") String header);

    @HttpApi(url = "http://127.0.0.1:8801/service/hoppinzq?method=id",method="post")
    String getId(@RequestBody String params);

}